import 'package:flutter/cupertino.dart';

import '../click_util.dart';

extension WidgetUtils on Widget {
  Widget onTap(Function() onTap) => GestureDetector(
      child: this,
      onTap: () {
        if (ClickUtil.isFastClick()) {
          return;
        }
        onTap();
      });

  Widget setBackGroundColor(Color color) => Container(child: this, color: color);
}
